import 'package:cotton_candy/notifier/theme_notifier.dart';
import 'package:flutter/cupertino.dart';
import 'package:provider/provider.dart';

class GradientContainer extends StatelessWidget {
  final Widget child;
  GradientContainer({this.child});
  @override
  Widget build(BuildContext context) {
    ThemeNotifier notifier = context.watch();
    return Container(
      child: child,
      width: double.infinity,
      height: double.infinity,
      decoration: BoxDecoration(
        gradient: LinearGradient(
            begin: Alignment.topCenter,
            end: Alignment.bottomCenter,
            colors: [
              notifier.primaryColor,
              notifier.gradientToColor,
            ]),
      ),
    );
  }
}
